home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
asmexam.arc
/
ODDS.LST
< prev
next >
Wrap
File List
|
1984-03-17
|
3KB
|
105 lines
The Microsoft MACRO Assembler 03-16-84 PAGE 1-1
PAGE 55,132
0000 DATA SEGMENT PARA
0000 0004 VAR1 DW 4
0002 05 VAR2 DB 5
0003 ???? RES DW ?
0005 DATA ENDS
0000 STACK SEGMENT STACK
0000 0A [ DW 10 DUP(?)
????
]
0014 STACK ENDS
0000 CODE SEGMENT PARA
ASSUME CS:CODE,DS:DATA,SS:STACK
0100 ORG 100H
0100 A1 0000 R START: MOV AX,VAR1 ; DATA MOVED FROM DATA SEGMENT TO REGISTER
0103 50 PUSH AX ; CONTENTS MOVED TO STACK
0104 1E PUSH DS ; PUSH DATA SEGMENT ADDRESS TO STACK
0105 9C PUSHF ; PUSH FLAG REGISTER ON STACK
0106 2D 0004 SUB AX,4 ; ALTER FLAGS
0109 9D POPF ; POP OUT OLD FLAGS
010A 8E D9 MOV DS,CX ; CHANGE DS VALUE
010C 1F POP DS ; RESTORE OLD VALUE
010D 58 POP AX ; POP VAR1 BACK TO AX
010E E8 011A R CALL ODDENDS
0111 A0 0002 R MOV AL,VAR2
0114 1E PUSH DS
0115 E8 0120 R CALL TRANSLATE
0118 1F POP DS
0119 90 NOP
011A ODDENDS PROC NEAR
011A 93 XCHG BX,AX ; XCHANGE AX <---> BX
011B F9 STC ; SET CARRY
011C FC CLD ; CLEAR DIRECTION
011D FA CLI ; CLEAR INTERRUPT
011E 9F LAHF ; LOAD FLAGS INTO AH
011F C3 RET
The Microsoft MACRO Assembler 03-16-84 PAGE 1-2
0120 ODDENDS ENDP
0120 TRANSLATE PROC NEAR
; ASSUME AL CONTAINS CODE READ IN
0120 2E: C5 1E 0128 R LDS BX,CS:TAB_POINTER
0125 2E: D7 XLAT CS:XMIT_TABLE ;M(BX+AL) --> AL
0127 C3 RET
0128 012C ---- R TAB_POINTER DD XMIT_TABLE
012C 35 37 39 31 33 36 XMIT_TABLE DB '5791368024'
38 30 32 34
0136 TRANSLATE ENDP
0136 CODE ENDS
END START
The Microsoft MACRO Assembler 03-16-84 PAGE Symbols-1
Segments and groups:
N a m e Size align combine class
CODE . . . . . . . . . . . . . . 0136 PARA NONE
DATA . . . . . . . . . . . . . . 0005 PARA NONE
STACK. . . . . . . . . . . . . . 0014 PARA STACK
Symbols:
N a m e Type Value Attr
ODDENDS. . . . . . . . . . . . . N PROC 011A CODE Length =0006
RES. . . . . . . . . . . . . . . L WORD 0003 DATA
START. . . . . . . . . . . . . . L NEAR 0100 CODE
TAB_POINTER. . . . . . . . . . . L DWORD 0128 CODE
TRANSLATE. . . . . . . . . . . . N PROC 0120 CODE Length =0016
VAR1 . . . . . . . . . . . . . . L WORD 0000 DATA
VAR2 . . . . . . . . . . . . . . L BYTE 0002 DATA
XMIT_TABLE . . . . . . . . . . . L BYTE 012C CODE
Warning Severe
Errors Errors
0 0